package designPattern.observer;

public class Client {
    public static void main(String[] args) {

        WeatherData weatherData = new WeatherData();

        //创建观察者
        CurrentConditions currentConditions = new CurrentConditions();

        //注册到weatherData
        weatherData.registerObserver(currentConditions);

        //测试
        System.out.println("通知各个观察者，查看信息");
        weatherData.setData(11.1f,12.7f,123.2f);
    }
}
